package com.demo.datastructure.linkedList;

/**
 * @description:
 * @author: ljr
 * @time: 2021/4/14 17:55
 */
public class LinkedListDemo3<T>{

    private final Node<T> first = new Node<>(null, null);


    int size = 0;

    public boolean addNode(Node<T> node, T value){
        Node<T> newNode = new Node<>(value,node.next);
        node.next = newNode;
        return true;
    }

    private static class Node<T>{
        private final T val;
        private Node<T> next;

        public Node(T val, Node<T> next) {
            this.val = val;
            this.next = next;
        }
    }


    private static class Iterator<T>{



    }
}
